package com.rzl.expense.web.controller.api;

import com.rzl.expense.agent.DataAgentService;
import com.rzl.expense.common.annotation.Log;
import com.rzl.expense.common.core.controller.BaseController;
import com.rzl.expense.common.core.domain.AjaxResult;
import com.rzl.expense.common.core.page.TableDataInfo;
import com.rzl.expense.common.enums.BusinessType;
import com.rzl.expense.common.utils.DateUtils;
import com.rzl.expense.common.utils.poi.ExcelUtil;
import com.rzl.expense.expense.domain.TwrRentCtl;
import com.rzl.expense.expense.domain.twr.TwrHighTower;
import com.rzl.expense.expense.domain.twr.TwrHighTowerSummary;
import com.rzl.expense.expense.service.twr.ITwrHighTowerService;
import com.rzl.expense.expense.service.twr.ITwrHighTowerSummaryService;
import com.rzl.expense.quartz.task.RuleSqlAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 铁塔-高价塔占比分析Controller
 *
 * @author 董涛
 * @date 2024-11-18
 */
@RestController
@RequestMapping("/test/sql")
public class TestController extends BaseController {
    @Autowired
    private DataAgentService dataAgentService;


    @GetMapping("/data")
    public AjaxResult list(String data) {

//        List<Map<String, Object>> list = (List<Map<String, Object>>) dataAgentService.getData(RuleSqlAdapter.getRentAccrual("202410",1,10), Map.class);
        List<Map<String, Object>> list = (List<Map<String, Object>>) dataAgentService.getData(data, Map.class);
        return AjaxResult.success(list);
    }


}
